import request from '@/utils/request'

// 查询请假列表
export function listAskleave(query) {
  return request({
    url: '/business/askleave/list',
    method: 'get',
    params: query
  })
}

// 查询请假详细
export function getAskleave(id) {
  return request({
    url: '/business/askleave/' + id,
    method: 'get'
  })
}

// 新增请假
export function addAskleave(data) {
  return request({
    url: '/business/askleave',
    method: 'post',
    data: data
  })
}

// 修改请假
export function updateAskleave(data) {
  return request({
    url: '/business/askleave',
    method: 'put',
    data: data
  })
}

// 删除请假
export function delAskleave(id) {
  return request({
    url: '/business/askleave/' + id,
    method: 'delete'
  })
}

// 导出请假
export function exportAskleave(query) {
  return request({
    url: '/business/askleave/export',
    method: 'get',
    params: query
  })
}